<?php         
$allItems = $this->row;
echo count($allItems);
?>
<div class="blockcms">
    <h3>
        Xem hồ sơ &raquo; <?=@$allItems[0]['username']?>
    </h3>
<center>
    <table width="100%">
        <tr valign="top">
            <td>
                <table width="100%">
                    <thead>
                        <tr>
                            <td width="150px"></td>
                            
                        </tr>
                    </thead>
                    <tbody>
                   <?php         
                                        if (isset($allItems[0])) {
                                         foreach($allItems as $item){
                     ?>
                   
            <tr>
                <td>Họ tên</td>
                <td><?=$item['lastname']?> <?=$item['firstname']?> </td>
            </tr>
            <tr>
                <td>Ngày đăng kí</td>
                <td><?=$item['registrydate']?></td>
            </tr>
            <tr>
                <td>Giới tính</td>
                <td><?php if(1 == $item['gender'])echo 'Name';else echo 'Nữ';?></td>
            </tr>
            <tr>
                <td>Hôn nhân</td>
                <td><?php if(1 == $item['marystatus'])echo 'Độc thân';else echo 'Đã lập gia đình';?></td>
            </tr>
            <tr>
                <td>Ngày sinh</td>
                <td><?= date('Y',strtotime($item['birtday']))?></td>
            </tr>
            <tr>
                <td>Tỉnh/Thành</td>
                <td><?=$item['city']?></td>
            </tr>
            <tr>
                <td>Chiều cao</td>
                <td><?=$item['height']?></td>
            </tr>
             <tr>
                <td>Cân nặng</td>
                <td><?=$item['weight']?></td>
            </tr>
                     <?php
                                               
                                         }
                                }

                                
                    ?>
                    <tr>
                        <td colspan="2">
                            <input type="button" value="Gửi tin nhắn" style="border:1px solid yellow;background:#900000; margin:5px 2px;color:yellow;" onclick="location.href='<?=BASE_URL?>/message/compose/?to=<?=urlencode($item['username'])?>'">
                            &nbsp;&nbsp;&nbsp;
                            <!--input type="button" value="View Photos" style="border:1px solid yellow;background:#900000; margin:5px 2px;color:yellow;" onclick="location.href='<?=BASE_URL?>/user/images?id=<?=urlencode($item['category_id'])?>'"-->
                        </td>
                    </tr>
                    </tbody>
                </table>
            </td>
        </tr>
        </table>
    </center>
</div>
